class T2E05
{
	public static void main(String[] args) 
	{
		Link l = new Link();
		l.add(10);
		l.add(20);
		System.out.println("Hello World!");
	}
}
class Node 
{   
    private int data;     
    private Node next; 
	
    public Node(int data)
	{   
		this.data = data;  
		this.next = null; 
	}  
    public Node(int data,Node next)
	{   
		this.data = data;  
		this.next = next; 
	} 
	public void setData(int data)
	{
		this.data = data;
	}
	public int getData()
	{
		return this.data;
	}
	public void setNext(Node next)
	{
		this.next = next;
	}
	public Node getNext()
	{
		return this.next;
	}
}

class Link
{   
	private Node firstNode;   
	public Link ()
	{   
	  this.firstNode=null;   
	}
	public boolean add(int data)
	{
		if (firstNode == null)  // 如果是空链表的话
		{
			firstNode = new Node(data);
			return true ;
		}
		else
		{
			firstNode.setNext(new Node(data));
			return false;
		}
	}
	//public boolean isEmpty(){    }   
	//public void insertHeadNode(int data){   }   
	//public Node deleteHeadNode(){    }   
	//public void findNode(int k){    }   
	//public void displayLink (){    }          
}